Step 2 - Localize all other content

Besides translating the text content into multiple languages, Kanzi enables you to use different resources for each locale, including animations, brushes, composers, fonts, materials, meshes, textures, and styles.

In this step of the tutorial you learn how to set up a Kanzi application to use different textures and meshes for each locale.

The Kanzi Studio project provided with this tutorial already contains the textures and meshes for each locale. You can find:

In this step you select which textures and meshes you want to use with which locale.

Localize textures

In this section you localize the textures in the application.

To localize textures:

  1. In the Project right-click the Grid Layout 3D node and select Add Resources to Localization Table.
    To add resources to a localization table for only the selected tree of nodes, right-click the top node in the tree and select Add Resources to Localization Table. Kanzi Studio shows in the Add Resources to Localization Table window only the resources used in that tree.
  2. In the Add Resources to Localization Table window set:
    1. Localization Table to Localization Table.
      Select the same localization table you created in the first step of this tutorial.
    2. Select to show the image resources in the selected node and click Select All to select all listed resources.
    3. Deselect the text resources.
    4. Click Add.
  3. In the Library > Localization double-click the Localization Table (Main) localization table.
    Localization Editor opens. In the Localization Editor you can add and edit localized resources in your Kanzi application, add resources you want to localize, and select which locale uses which resource.
  4. In the Localization Editor in the column for each locale select the texture you want to use for that locale.
    If you do not select a resource or value for a locale, Kanzi uses the default resource or value for that locale. The default value is listed in the Default Value column.
    For example, for the Phone.AppTexture resource the Default Value is Textures/Phone. For the de-DE locale (German), select Phone_de texture, and for fi-FI locale (Finnish), select Phone_fi.

Localize meshes

In this section you localize the meshes in the application. This section introduces a different way of adding individual resources to localization tables.

To localize meshes:

  1. In the Project > Prefabs select the App > Model node:
    1. In the Properties in the Mesh property select <Create resource ID ...> to create a resource ID from the currently used mesh.
    2. In the Create Resource ID window set Resource Dictionary to Localization Table.
    3. Click OK.
  2. In the Library > Localization double-click the Localization Table (Main) localization table. In the Localization Editor in the column for each locale select the mesh you want to use for that locale.
    For example, for the Round resource the Default Value is Mesh Data/Round. For the de-DE locale (German), select the Diamond mesh, and for fi-FI locale (Finnish), select the Cube mesh.

    Now when you change the locale, Kanzi uses different meshes and a different set of textures for each locale.

< PREVIOUS STEP

NEXT STEP >

See also

Localizing applications

Using locales

Preloading resource dictionaries